<template>
        <span class="priceShow">￥<em>{{price | priceUnit_int}}</em>.{{price | priceUnit_float}} <b v-show="unitName" v-text="'/'+unitName"></b></span>
</template>
<script>
export default {
    props: {
        price:{
            default:''
        },
        unitName:''

    },
    data(){
        return {
            num1: '',
            num2: ''
        }
    },
    filters: {
        priceUnit_int(price){
            return (parseFloat(price).toFixed(2) + '').split('.')[0];
        },
        priceUnit_float(price){
            return (parseFloat(price).toFixed(2) + '').split('.')[1];
        }
    },
    created() {
    },
    mounted(){

    }
}
</script>
<style lang="less">
.priceShow{
        font-size: .24rem;
        color: inherit;
        line-height: .3rem;
        font-weight: 500;
        em{
            font-size: .36rem;
        }
        b{
            font-weight: normal;
        }
}
</style>